<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreatePaylogsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('paylogs', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->integer('user_id')->nullable()->comment('用户id');
            $table->integer('server_id')->nullable()->comment('服务器标识');
            $table->string('order_num',50)->nullable()->comment('订单号');
            $table->integer('type')->nullable()->comment('1服务端续费 2升级');
            $table->decimal('money', 11, 2)->nullable()->comment('费用');
            $table->tinyInteger('payway')->nullable()->comment('支付方式');
            $table->integer('state')->nullable()->comment('0待支付 1支付成功');
            $table->string('info',100)->nullable();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('paylogs');
    }
}
